package com.hnyfkj.jyindustry.biz.admin.controller;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


@Controller
@RequestMapping("/appredirect")
public class AppapiGotoindexController {

//	@Autowired
//	private IMemberinfoService memberinfoService;
//	@RequestMapping("/ccc")
//	public String  getUser(String htmlname, Model model,@ModelAttribute PageUtil page) {
//		List<CompanyListDto> list = null;
//		String retJson = null;
//		CompanyNoPageDto nopageDto=new CompanyNoPageDto();
//		Map param = new HashMap();
//		try
//		{
//			list = companyService.getList(nopageDto);
//		} catch (Exception e) {
//			retJson = "{'status':'500','message':'操作失败！" + e.toString() + "'}";
//		}
//
//		model.addAttribute("user", "asdasd");
//		model.addAttribute("list", list);
//
//		//        return "/user/detail";
//		return htmlname;
//	}
	/**
	 * 登录状态的跳转页面
	 * @param model
	 * @param request
	 * @param htmlname
	 * @return
	 */
	@GetMapping("/gotomemberlistpost")
	public String gotomemberlistpost(ModelMap model,HttpServletRequest request,String saleid,String phone,String name,String wxname,String page,String pagesize) {
//		model.addAttribute("companyid", companyid);
//		model.addAttribute("mobiletype", type);
		model.addAttribute("phone", phone);
		model.addAttribute("name", name);
		model.addAttribute("wxname", wxname);
		
		List list=new ArrayList();
		model.addAttribute("memberinfo", list);
		return "/html/test";
		//		return new ModelAndView("/html/"+htmlname+".html", model);
		//		return new ModelAndView("forward:/weixin/html/"+htmlname+".jsp", model);
	}

	
	@RequestMapping("/my")
	public ModelAndView gotohtmlbylogin1(String htmlname,String memberid) {
		ModelAndView mv=new ModelAndView();
		mv.setViewName(htmlname);
		mv.addObject("name", "liyafei");

		//设置返回的数据为json类型，也可以不设置，返回对象
		//mv.setView(new MappingJackson2JsonView());
		return mv;
		//		return new ModelAndView("/html/"+htmlname+".html", model);
		//		return new ModelAndView("forward:/weixin/html/"+htmlname+".jsp", model);
	}
}

